import request from '@/utils/request'

// 获得评审专家分页
export function getReviewsList(params?: any) {
  return request({
    url: '/project/review-expert/page',
    method: 'GET',
    params,
  })
}

// 获得评审专家
export function getReviewsInfo(params?: any) {
  return request({
    url: '/project/review-expert/get',
    method: 'GET',
    params,
  })
}

// 创建评审专家
export function addReview(data?: any) {
  return request({
    url: '/project/review-expert/create',
    method: 'POST',
    data,
  })
}

// 删除评审专家
export const deleteReview = (id: number) => {
  return request({
    url: `/project/review-expert/delete?id=${id}`,
    method: 'DELETE',
  })
}
// 更新评审专家
export const updateReview = (data: any) => {
  return request({
    url: '/project/review-expert/update',
    method: 'PUT',
    data,
  })
}

// 导出评审专家 Excel
export function getReviewExport(params: any) {
  return request({
    url: '/project/review-expert/export-excel',
    method: 'GET',
    responseType: 'blob',
    params,
  })
}